﻿using crip.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace crip.Dtos
{
    public class EventDto
    {
        [Required]
        public Guid Id { get; set; }
        [Required]
        public string? EventName { get; set; }
        //事件描述（可空、最大长度为100）
        [MaxLength(100)]
        public string? EventDescription { get; set; }
        //事件级别(不可空)
        [Required]
        public EventLevels Level { get; set; }
        //事件详情（不可空）
        [Required]
        public string? EventDetail { get; set; }
        //图片（可空、图片外键）
        public ICollection<Picture> Pictures { get; set; } = new List<Picture>();
        //区域Id
        [ForeignKey("AreaId")]
        public Guid AreaId { get; set; }
        public Area Area { get; set; }
        [Required]
        public DateTime CreateTime { get; set; }
        public DateTime? StartTime { get; set; }
        public DateTime? EndTime { get; set; }
    }
}
